package com.ChenYaRou.www.controller.servlet;

import com.ChenYaRou.www.controller.FuzzySelectShopServletController;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @ClassName FuzzySelectShopServlet
 * @Description TODO
 * @Author 86183
 * @Date 2022/5/1 13:52
 * @Version 1.0
 **/
public class FuzzySelectShopServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        FuzzySelectShopServletController fuzzySelectShopServlet=new FuzzySelectShopServletController();
        PrintWriter out = resp.getWriter();
        System.out.println("this+++"+req.getParameter("fuzzyWord"));
        out.write(fuzzySelectShopServlet.fuzzySelectShop(req.getParameter("fuzzyWord")));
        out.flush();
        out.close();
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}
